<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            margin: 100px auto;
            width: 300px;
            height: 105px;
            border-radius: 20px;
            /* 把渐变当图片 */
            background: url(image/paopao.png) no-repeat left top,url(image/paopao.png) no-repeat right bottom;
            /* 颜色写在下面 不然被层叠 */
            background-color: pink;
            /* 谁做动画给谁加 */
            transition:  background-position 2s;

        }
        div:hover {
            background-position: right bottom, left top;

        }
    </style>
</head>
<body>
    <div></div>
    
</body>
</html>